package com.smrtcold.dev.mapper;


import com.smrtcold.dev.dto.base.TempPressure;
import com.smrtcold.dev.dto.dev.base.DevData;
import com.smrtcold.dev.dto.dev.base.SisData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Mapper
public interface DataMapper {

    public void clearData();

    public void clearLogs();

    public void add(@Param("list") Collection<DevData> list);

    public void addlog(@Param("tid") long tid, @Param("status") int status, @Param("isctl") int isctl, @Param("content") String content);

    List<DevData> get(@Param("devid") String devid, @Param("addres") String addres, @Param("queryTime") int queryTime);

    SisData avgTemp(@Param("devid") String devid, @Param("addres") String addres, @Param("queryTime") int queryTime);


    List<SisData> getSisData(@Param("mk") String mk, @Param("queryTime") int queryTime);

    //增值key
    void addKey(@Param("mk") String mk);


    List<Map> ctlData(@Param("mk") String mk, @Param("value") int value, @Param("queryday") int queryday);

    Integer ctlcount();

    //获取接近低压
    Float getLowPressure(@Param("type") String type, @Param("temp") double temp);

    List<TempPressure> getxlLowPressure(@Param("type") String type, @Param("temp") double temp);

}
